import { ExcludedDirectoriesModel, IncludedDirectoriesModel } from "common.slint";

export global Settings {
    in-out property <int> settings_preset_idx: 0;
    in-out property <[string]> settings_presets: ["Preset 1", "Preset 2"];

    in-out property <[string]> languages_list: ["English", "Polski (Polish)", "Français (French)", "Italiano (Italian)", "Русский (Russian)", "український (Ukrainian)", "한국인 (Korean)", "Česky (Czech)", "Deutsch (German)", "やまと (Japanese)", "Português (Portuguese)", "Português Brasileiro (Brazilian Portuguese)", "简体中文 (Simplified Chinese)", "繁體中文 (Traditional Chinese)", "Español (Spanish)", "Norsk (Norwegian)", "Swedish (Svenska)", "المملكة العربية السعودية (Saudi Arabia)", "България (Bulgaria)", "Ελλάδα (Greece)", "Nederland (Netherlands)", "România (Romanian)", "Türkçe (Turkish)"];
    in-out property <int> language_index: 0;
    in-out property <string> language_value: "English";

    in-out property <[IncludedDirectoriesModel]> included_directories_model: [{ path: "/home/pathssssssssssssssssssssss", referenced_folder: false, selected_row: false },{ path: "/home/path", referenced_folder: false, selected_row: false },{ path: "/home/path", referenced_folder: false, selected_row: false },{ path: "/home/path", referenced_folder: false, selected_row: false }];
    in-out property <int> included_directories_model_selected_idx: -1;
    in-out property <[ExcludedDirectoriesModel]> excluded_directories_model: [{ path:"/home/pathssssssssssssssssssssssss", selected_row: false },{ path:"/home/path", selected_row: false },{ path:"/home/path", selected_row: false },{ path:"/home/path", selected_row: false }, { path:"/home/a", selected_row: false }];
    in-out property <int> excluded_directories_model_selected_idx: -1;

    // Settings
    in-out property <bool> dark_theme: true;
    in-out property <bool> show_only_icons: false;
    in-out property <bool> load_windows_size_at_startup: true;
    in-out property <bool> load_tabs_sizes_at_startup: true;
    in-out property <string> excluded_items: "Excluded items";
    in-out property <string> allowed_extensions: "Allowed extensions";
    in-out property <string> excluded_extensions: "Excluded extensions";
    in-out property <string> minimum_file_size: 0;
    in-out property <string> maximum_file_size: 0;
    in-out property <bool> recursive_search: true;
    in-out property <bool> use_cache: false;
    in-out property <bool> save_as_json: false;
    in-out property <bool> move_to_trash: false;
    in-out property <bool> ignore_other_filesystems: false;
    in-out property <float> thread_number: 4;

    in-out property <bool> duplicate_image_preview;
    in-out property <bool> duplicate_hide_hard_links;
    in-out property <bool> duplicate_use_prehash;
    in-out property <string> duplicate_minimal_hash_cache_size;
    in-out property <string> duplicate_minimal_prehash_cache_size;
    in-out property <bool> duplicate_delete_outdated_entries;
    in-out property <bool> similar_images_show_image_preview;
    in-out property <bool> similar_images_delete_outdated_entries;
    in-out property <bool> similar_images_hide_hard_links;

    // in-out property <int> similar_videos_show_video_preview; // TODO - maybe someday
    in-out property <bool> similar_videos_delete_outdated_entries;
    in-out property <bool> similar_videos_hide_hard_links;

    in-out property <bool> similar_music_delete_outdated_entries;

    // Allowed subsettings
    // Similar Images
    in-out property <[string]> similar_images_sub_available_hash_size: ["8", "16", "32", "64"];
    in-out property <int> similar_images_sub_hash_size_index: 1;
    in-out property <string> similar_images_sub_hash_size_value: "16";
    in-out property <[string]> similar_images_sub_available_resize_algorithm: ["Lanczos3", "Nearest", "Triangle", "Gaussian", "CatmullRom"];
    in-out property <int> similar_images_sub_resize_algorithm_index: 0;
    in-out property <string> similar_images_sub_resize_algorithm_value: "Lanczos3";
    in-out property <[string]> similar_images_sub_available_hash_type: ["Mean", "Gradient", "BlockHash", "VertGradient", "DoubleGradient", "Median"];
    in-out property <int> similar_images_sub_hash_alg_index: 10;
    in-out property <string> similar_images_sub_hash_alg_value: "Gradient";
    in-out property <float> similar_images_sub_max_similarity: 40;
    in-out property <float> similar_images_sub_current_similarity: 20;
    in-out property <bool> similar_images_sub_ignore_same_size: false;

    // Duplicates
    in-out property <[string]> duplicates_sub_check_method: ["Hash", "Size", "Name", "Size and Name"];
    in-out property <int> duplicates_sub_check_method_index: 0;
    in-out property <string> duplicates_sub_check_method_value: "Hash";
    in-out property <[string]> duplicates_sub_available_hash_type: ["Blake3", "CRC32", "XXH3"];
    in-out property <int> duplicates_sub_available_hash_type_index: 0;
    in-out property <string> duplicates_sub_available_hash_type_value: "Blake3";
    in-out property <bool> duplicates_sub_name_case_sensitive: false;

    // Big files
    in-out property <[string]> biggest_files_sub_method: ["The Biggest", "The Smallest"];
    in-out property <int> biggest_files_sub_method_index: 0;
    in-out property <string> biggest_files_sub_method_value: "The Biggest";
    in-out property <string> biggest_files_sub_number_of_files: 50;

    // Similar Videos
    in-out property <bool> similar_videos_sub_ignore_same_size;
    in-out property <float> similar_videos_sub_max_similarity: 20;
    in-out property <float> similar_videos_sub_current_similarity: 15;

    in-out property <float> similar_videos_skip_forward_amount: 15;
    in-out property <float> similar_videos_skip_forward_amount_max: 360;
    in-out property <float> similar_videos_skip_forward_amount_min: 1;

    in-out property <float> similar_videos_vid_hash_duration: 10;
    in-out property <float> similar_videos_vid_hash_duration_max: 60;
    in-out property <float> similar_videos_vid_hash_duration_min: 1;

    in-out property <[string]> similar_videos_crop_detect: ["LetterBox", "Motion", "None"];
    in-out property <string> similar_videos_crop_detect_value: "letterbox";
    in-out property <int> similar_videos_crop_detect_index: 0;

    // Same Music
    in-out property <[string]> similar_music_sub_audio_check_type: ["Tags", "Fingerprint"];
    in-out property <int> similar_music_sub_audio_check_type_index: 0;
    in-out property <string> similar_music_sub_audio_check_type_value: "Tags";
    in-out property <bool> similar_music_sub_approximate_comparison;
    in-out property <bool> similar_music_sub_title: true;
    in-out property <bool> similar_music_sub_artist: true;
    in-out property <bool> similar_music_sub_year: false;
    in-out property <bool> similar_music_sub_bitrate: false;
    in-out property <bool> similar_music_sub_genre: false;
    in-out property <bool> similar_music_sub_length: false;
    in-out property <bool> similar_music_compare_fingerprints_only_with_similar_titles: false;
    in-out property <float> similar_music_sub_minimal_fragment_duration_value: 5.0;
    in-out property <float> similar_music_sub_minimal_fragment_duration_max: 180.0;
    in-out property <float> similar_music_sub_maximum_difference_value: 3.0;
    in-out property <float> similar_music_sub_maximum_difference_max: 10.0;

    // Broken Files
    in-out property <bool> broken_files_sub_audio: true;
    in-out property <bool> broken_files_sub_pdf: false;
    in-out property <bool> broken_files_sub_archive: false;
    in-out property <bool> broken_files_sub_image: false;

    out property <length> path_px: 350px;
    out property <length> name_px: 100px;
    out property <length> mod_px: 150px;
    out property <length> size_px: 75px;

    in-out property <[string]> duplicates_column_name: ["Selection", "Size", "File Name", "Path", "Modification Date"];
    in-out property <[length]> duplicates_column_size: [35px, size_px, name_px, path_px, mod_px];
    in-out property <[string]> empty_folders_column_name: ["Selection", "Folder Name", "Path", "Modification Date"];
    in-out property <[length]> empty_folders_column_size: [35px, name_px, path_px, mod_px];
    in-out property <[string]> big_files_column_name: ["Selection", "Size", "File Name", "Path", "Modification Date"];
    in-out property <[length]> big_files_column_size: [35px, size_px, name_px, path_px, mod_px];
    in-out property <[string]> empty_files_column_name: ["Selection", "File Name", "Path", "Modification Date"];
    in-out property <[length]> empty_files_column_size: [35px, name_px, path_px, mod_px];
    in-out property <[string]> temporary_files_column_name: ["Selection", "File Name", "Path", "Modification Date"];
    in-out property <[length]> temporary_files_column_size: [35px, name_px, path_px, mod_px];
    in-out property <[string]> similar_images_column_name: ["Selection", "Similarity", "Size", "Dimensions", "File Name", "Path", "Modification Date"];
    in-out property <[length]> similar_images_column_size: [35px, 80px, 80px, 80px, name_px, path_px, mod_px];
    in-out property <[string]> similar_videos_column_name: ["Selection", "Size", "File Name", "Path", "Modification Date"];
    in-out property <[length]> similar_videos_column_size: [35px, size_px, name_px, path_px, mod_px];
    in-out property <[string]> similar_music_column_name: ["Selection", "Size", "File Name", "Title", "Artist", "Year", "Bitrate", "Length", "Genre", "Path", "Modification Date"];
    in-out property <[length]> similar_music_column_size: [35px, size_px, name_px, 80px, 80px, 80px, 80px, 80px, 80px, path_px, mod_px];
    in-out property <[string]> invalid_symlink_column_name: ["Selection", "Symlink Name", "Symlink Folder", "Destination Path", "Modification Date"];
    in-out property <[length]> invalid_symlink_column_size: [35px, name_px, path_px, path_px, mod_px];
    in-out property <[string]> broken_files_column_name: ["Selection", "File Name", "Path", "Type of Error", "Size", "Modification Date"];
    in-out property <[length]> broken_files_column_size: [35px, name_px, path_px, 200px, size_px, mod_px];
    in-out property <[string]> bad_extensions_column_name: ["Selection", "File Name", "Path", "Current Extension", "Proper Extension"];
    in-out property <[length]> bad_extensions_column_size: [35px, name_px, path_px, 40px, 200px];
}
